package com.swanclouds.redfish.systems.domain;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.swanclouds.model.systems.PCIeFunctions;

import java.util.Map;

public class PCIeFunctionsModel implements PCIeFunctions {

    @JsonProperty("@odata.id")
    private String dataId;

    /**
     * 系统资源模型的OData描述信息
     */
    @JsonProperty("@odata.context")
    private String context;

    /**
     * 系统资源的类型
     */
    @JsonProperty("@odata.type")
    private String type;

    /**
     * 系统资源的ID
     */
    @JsonProperty("Id")
    private String id;

    /**
     * 系统资源的名称
     */
    @JsonProperty("Name")
    private String name;

    @JsonProperty("DeviceId")
    private String deviceId;

    @JsonProperty("VendorId")
    private String vendorId;

    @JsonProperty("ClassCode")
    private String classCode;

    @JsonProperty("DeviceClass")
    private String deviceClass;

    @JsonProperty("SubsystemId")
    private String subsystemId;

    @JsonProperty("SubsystemVendorId")
    private String subsystemVendorId;

    @JsonProperty("Oem")
    private Map<String,Object> oem;

    @Override
    public String getId() {
        return this.id;
    }

    @Override
    public String getName() {
        return this.name;
    }

    @Override
    public String getDataId() {
        return this.dataId;
    }

    @Override
    public String getContext() {
        return this.context;
    }

    @Override
    public String getType() {
        return this.type;
    }

    @Override
    public String toString() {
        ObjectMapper objectMapper = new ObjectMapper();
        try {
            return objectMapper.writeValueAsString(this);
        } catch (JsonProcessingException e) {
        }
        return "PCIeFunctionsModel{" +
                "dataId='" + dataId + '\'' +
                ", context='" + context + '\'' +
                ", type='" + type + '\'' +
                ", id='" + id + '\'' +
                ", name='" + name + '\'' +
                ", DeviceId='" + deviceId + '\'' +
                ", VendorId='" + vendorId + '\'' +
                ", ClassCode='" + classCode + '\'' +
                ", DeviceClass='" + deviceClass + '\'' +
                ", SubsystemId='" + subsystemId + '\'' +
                ", SubsystemVendorId='" + subsystemVendorId + '\'' +
                ", oem=" + oem +
                '}';
    }
}
